package com.app.bimo.commonbusiness.util;

import com.app.bimo.commonbusiness.mvp.IView;
import com.uber.autodispose.AutoDisposeConverter;

public class CustomAutoDisposeConverter<T>{
    private AutoDisposeConverter<T> autoDisposeConverter;
    private IView iView;
    private boolean isPageLoading=false;
    private boolean isShowLoading=false;
    public CustomAutoDisposeConverter(AutoDisposeConverter<T> autoDisposeConverter, IView iView) {
        this.autoDisposeConverter = autoDisposeConverter;
        this.iView = iView;
    }

    public AutoDisposeConverter<T> getAutoDisposeConverter() {
        return autoDisposeConverter;
    }

    public void setAutoDisposeConverter(AutoDisposeConverter<T> autoDisposeConverter) {
        this.autoDisposeConverter = autoDisposeConverter;
    }

    public IView getiView() {
        return iView;
    }


    public boolean isPageLoading() {
        return isPageLoading;
    }

    public void setPageLoading(boolean pageLoading) {
        isPageLoading = pageLoading;
        if(isPageLoading){
            setShowLoading(false);
        }
    }

    public boolean isShowLoading() {
        return isShowLoading;
    }

    public void setShowLoading(boolean showLoading) {
        isShowLoading = showLoading;
    }
}
